package mock.servicesdirectory.dao.daointerface;

import java.util.ArrayList;
import java.util.List;

import mock.servicesdirectory.web.model.PremiseList;

public class PremiseListDAO {
	private static List<PremiseList> PremiseListLst=new ArrayList<PremiseList>();
	 static int total=50;
	 static {
	        for(int i=1;i<total;i++)
	        {
	        	
	        	PremiseListLst.add(new PremiseList("Premise "+i,"Address "+i,"Location "+i,"Phone Number "+i));
	        }
	    }
		public static int nextInt(){
			return total++;
		}
		
		public static List<PremiseList> buildList(){
			return PremiseListLst;
		}
		
		public static int count(){
			return PremiseListLst.size();
		}
		
		public static List<PremiseList> find(int from,int to){
			return PremiseListLst.subList(from, to);
		}
		
		public static PremiseList findById(Integer id){
			
			return null;
		}
		
		public static void save(PremiseList org){
			PremiseListLst.add(org);
		}
		
		public static void update(PremiseList org){
			
		}
		
		public static void delete(PremiseList org){
			PremiseListLst.remove(org);
		}
		public static List<PremiseList> findNotById(int id,int from,int to){
			List<PremiseList> subLst =  PremiseListLst.subList(from,to);
			List<PremiseList> temp = new ArrayList<PremiseList>();
			
			return temp;
		}
		
		 public static List<PremiseList> findLesserAsId(int id, int from,int to)
		    {
		        List<PremiseList> subLst= PremiseListLst.subList(from, to);
		        List<PremiseList> temp=new ArrayList<PremiseList>();

		       
		        return temp;
		    }
		    public static List<PremiseList> findGreaterAsId(int id, int from,int to)
		    {
		    	  List<PremiseList> subLst=PremiseListLst.subList(from, to);
			      List<PremiseList> temp=new ArrayList<PremiseList>();

		        
		        return temp;
		    }
}
